<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<ui:composition template="template.xhtml">
	<ui:define name="content">

		<h2>Modifica pacchetto "<h:outputText value="#{packageBean.pack.name}" />":</h2>

		<h:form>
			<p:panelGrid columns="2">
				<f:facet name="header">  
		        	Seleziona elementi predefiniti per il pacchetto
		    	</f:facet>
		    	
		    	<h:outputLabel value="Hotel predefinito:" /> 
		    	<p:selectOneMenu value="#{packageBean.pack.hotelId}" effect="fold" required="true">  
		            <f:selectItems var="hot" value="#{packageBean.availableHotels}" itemLabel="#{hot.name}" itemValue="#{hot.id}" />  
		            <p:column>  
		                #{hot.name}
		            </p:column> 
		        </p:selectOneMenu>
		        
		        <h:outputLabel value="Escursione predefinita:" /> 
		    	<p:selectOneMenu value="#{packageBean.pack.excursionId}" effect="fold" required="true">  
		            <f:selectItems var="exc" value="#{packageBean.availableExcursions}" itemLabel="#{exc.name}" itemValue="#{exc.id}" />  
		            <p:column>  
		                #{exc.name}
		            </p:column> 
		        </p:selectOneMenu>
		       
		    	
		    	<f:facet name="footer"> 
		    	
		    		<center>
		    			<p:button outcome="editPackage" value="Indietro" />
		    			<p:commandButton action="editPackagePersonalization" value="Avanti" />
		    		</center>
		    	
		    	</f:facet>
			
			</p:panelGrid>
			</h:form>
			<br />
			<p:messages showDetail="true" autoUpdate="true" closable="true" />

	</ui:define>
</ui:composition>
</html>